<template>
  <vae-map  @init-map="initMap" :options="options"  :style="{width:'100vw',height:'100vh'}"></vae-map>
</template>

<script>
import "@/plugins/leaflet/leaflet-tilelayer-wmts.js"
export default {
  name: "map",
  data() {
    return {
      options:{
        crs:L.CRS.EPSG4326,
        center: [109.5 , 42.1],
        zoom: 7
      },
      color:'transparent',
      map:null,
      bigLayer:"https://service.siweiearth.com/wmts/seis/v3/wmts/tile/1012/0",//全分辨率底图
      imgRXT_Home:"https://service.siweiearth.com/wmts/seis/v3/wmts/image_tile/",//日新图
      access_token:"f7d1f30bc73abd076614e9df11f41ae8",
      imgRXT_url:null,
      image_id:"1149008",

    };
  },
  created(){
    console.log(new L.TileLayer.WMTS("", {}));
  },
  methods:{
    initMap(v){
      this.map=v;
      // let imgRXT_url = this.imgRXT_Home+this.image_id+'/1?access_token=' + this.access_token  + '&product_id=101';
      let imgRXT_url = "https://service.siweiearth.com/wmts/seis/v3/wmts/tile/1012/0?access_token={f7d1f30bc73abd076614e9df11f41ae8}&product_id=102&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=6&TileCol=50&TileRow=9";
      let img_layer =new L.TileLayer.WMTS( imgRXT_url,{ format: "image/png",});
      console.log(img_layer);
      let imgLayer=L.layerGroup().addLayer(img_layer) ;
      this.map.addLayer(imgLayer);
    },
    add3DMap(){



    }
  }
}
</script>

<style scoped>

</style>
